﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using DTO;
using DAO;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Data;
namespace TMDT_ProjGroup09
{
    /// <summary>
    /// Summary description for LogisticSystem
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class LogisticSystem : System.Web.Services.WebService
    {

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }

        [WebMethod]
        public KhoDTO[] getListKho()
        {
            return new KhoDAO().GetAll();
        }


        [WebMethod]
        public ChiNhanhDTO[] ListDsChiNhanh()
        {
            ChiNhanhDAO ob = new ChiNhanhDAO();
            return ob.GetAll();

        }
        [WebMethod]
        public bool CheckLogin(String username,String password)
        {
            KhachHangDAO ob = new KhachHangDAO();
            return ob.CheckLogin(username,password);

        }

        [WebMethod]
        public ChiNhanhDTO[] TableDsChiNhanh()
        {
            ChiNhanhDAO ob = new ChiNhanhDAO();
            return ob.GetAll();

        }

      
    }
}
